<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
<head>
<title>YCG | Home </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

<link href="/study/Public/homes/css/style.css" rel="stylesheet" type="text/css" media="all" />
<link href="/study/Public/homes/css/owl.carousel.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="/study/Public/bootstrap/css/bootstrap.min.css">
<script type="text/javascript" src="/study/Public/bootstrap/js/jquery.min.js"></script>
<script type="text/javascript" src="/study/Public/bootstrap/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="/study/Public/homes/css/magnific-popup.css">
<script src="/study/Public/bootstrap/js/owl.carousel.js"></script>
	<script>
			$(document).ready(function() {
				$("#owl-demo").owlCarousel({
					items : 4,
					lazyLoad : true,
					autoPlay : true,
					navigation : true,
					navigationText : ["", ""],
					rewindNav : false,
					scrollPerPage : false,
					pagination : false,
					paginationNumbers : false,
				});
			});
		</script>
		<!-- //Owl Carousel Assets -->
		<!--768px-menu-->
		<link type="text/css" rel="stylesheet" href="/study/Public/homes/css/jquery.mmenu.all.css" />
		<script type="text/javascript" src="/study/Public/bootstrap/js/jquery.mmenu.js"></script>
			<script type="text/javascript">
				//	The menu on the left
				$(function() {
					$('nav#menu-left').mmenu();
				});
		</script>
		<!--//768px-menu-->

		<style type="text/css">
.group{
	margin-left: 50px;
	float: center;
}
.group img{
	width: 300px;
	height: 200px;
}
.group tr{
	width: 500px;
}
.groupname{
	margin-left: 50px;
}
.title{
	margin-left: 40px;
	font-family: 华文行楷;
	font-size: 60px;
	font-weight:bold;
}
.m{
	margin-left: 30px;
}
.table1{
	margin-top: 0px;
	padding: 0;
}
.user1{
	margin-top: -450px;
	margin-left: -70px;
}
.user2{
	margin-top: -307px;
}
.shenqing{
	margin-left: 350px;
	font-family: 华文行楷;
	font-size: 30px;
	margin-top: 430px;

}
.shenqing1{
	margin-left: 350px;
	font-family: 华文行楷;
	font-size: 30px;
	margin-top: 390px;

}
.shenqing2{
	margin-left: 300px;
	font-family: 华文行楷;
	font-size: 30px;
	margin-top: -100px;
}
.hit{
	margin-left: 400px;
	padding: 0px;
	font-weight: bold;
}
		</style>
</head>
<body>
<!-- start header -->
<div class="header_bg">
<div class="wrap">
	<div class="header">
		<div class="logo">
			<a href="index.html">
				<img src="/study/Public/homes/images/lg.png" alt=""/>
				<h1>YCG</h1>
				<div class="clear"> </div>
			 </a>
		</div>
		<div class="text">
		  <?php if(session('user.username') != null): ?><p><?php echo '欢迎您:'.session('user.username') ?></p><?php endif; ?>
		</div>
		<div class="clear"> </div>
	</div>
</div>
</div>
<!-- start header -->
<div class="header_btm">
	<div class="wrap">
		<!--start-768px-menu-->
			<div id="page">
					<div id="header">
						<a class="navicon" href="#menu-left"> </a>
					</div>
					<nav id="menu-left">
						<ul>
							<li class="active"><a href="<?php echo U('Index/index');?>">首页</a></li>
							<li><a href="<?php echo U('Group/grouplist');?>">社团页</a></li>
							<li><a href="<?php echo U('Practice/practicelist');?>">活动页</a></li>
							<li><a href="<?php echo U('Index/userDetail');?>">个人中心</a></li>
							<li><a href="">新闻动态</a></li>
					 <?php if(session('user.stunum') == null): ?><li>
                        <a href="#regModal" data-toggle="modal"  data-target="#regModal">注册</a></li>
                        <li>
                        <li><a  href="#loginModal" data-toggle="modal"  data-target="#loginModal">登录</a></li>
                        <?php else: ?><li><a href="<?php echo U('Index/logout');?>">注销</a></li><?php endif; ?>
						</ul>
					</nav>
			</div>
		<!--start-768px-menu-->
			<div class="header_sub">
				<div class="h_menu">
					<ul>
						<li class="active"><a href="<?php echo U('Index/index');?>">首页</a></li>
						<li><a href="<?php echo U('Group/grouplist');?>">社团页</a></li>
						<li><a href="<?php echo U('Practice/practicelist');?>">活动页</a></li>
						<li><a href="<?php echo U('Index/userDetail?id=session("user.stunum")');?>">个人中心</a></li>
						<li><a href="">新闻动态</a></li>
						<?php if(session('user.stunum') == null): ?><li>
                        <a href="#regModal" data-toggle="modal"  data-target="#regModal">注册</a></li>           
                        <li><a href="#loginModal" data-toggle="modal"  data-target="#loginModal">登录</a></li>
                        <?php else: ?><li><a href="<?php echo U('Index/logout');?>">注销</a></li><?php endif; ?>

					</ul>
				</div>
				<div class="h_search">
		    		<form>
		    			<input type="text" value="" placeholder="search something...">
		    			<input type="submit" value="">
		    		</form>
				</div>
				<div class="clear"> </div>
			</div>
	</div>
</div>
<div class="modal fade" id="loginModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"></span></button>
        <h4 class="modal-title" id="loginModallabel">用户登录:</h4>
      </div>
      <form  method="post" action="<?php echo U('Index/dologin');?>" class="form-horizontal">
    <div class="form-group">
    <label for="stunum" class="col-sm-2 control-label">用户名:</label>
    <div class="col-sm-6">
    <input type="text" class="form-control" id="stunum" name="stunum" placeholder="stunum"  >
    </div></div>

    <div class="form-group">
    <label for="pass" class="col-sm-2 control-label">密码:</label>
    <div class="col-sm-6">
    <input type="password" class="form-control" id="pass" name="pass"  placeholder="password" >
    </div></div>

    <div class="modal-footer">
    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
     <button type="submit" class="btn btn-primary">登陆</button>
      </div>
      </form>
    </div>
  </div>
</div>
<?php if(is_array($practice)): $i = 0; $__LIST__ = $practice;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><div class="row">
<h1 class="title">欢迎来到社团活动:<?php echo ($vo["name"]); ?></h1>
<div class="col-md-4">
<table class="group table .table-bordered .table-hover">
<h3 class="m">活动信息:</h3>
<tr><th>发布人:</th><td><?php echo ($vo["puser"]); ?></td></tr>
<tr><th>发布时间:</th><td><?php echo ($vo["pdate"]); ?></td></tr>
<tr><th>活动时间:</th><td><?php echo ($vo["ptime"]); ?></td></tr>
<tr><th>活动地点:</th><td><?php echo ($vo["place"]); ?></td></tr>
<tr><th>活动介绍:</th><td><?php echo ($vo["intro"]); ?></td></tr>
<tr><th>注意事项:</th><td><?php echo ($vo["matters"]); ?></td></tr>
<tr><th>点击量:</th><td><?php echo ($vo["hit"]); ?></td></tr>
</table></div>
<h5 class="shenqing1"><a href="<?php echo U('Index/updatePracticeInfo',array('id'=>$vo['id']));?>">管理活动信息</a></h5><?php endforeach; endif; else: echo "" ;endif; ?>

<div class="col-md-offset-6 col-md-4">
<h3 class="user2">活动成员信息:</h3>
	<table class="table1 table .table-bordered">
	<tr><th>学号:</th><th>姓名:</th><th>状态:</th><th>操作:</th></tr>
	<?php if(is_array($members)): $i = 0; $__LIST__ = $members;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vi): $mod = ($i % 2 );++$i;?><tr><td><?php echo ($vi["stunum"]); ?></td><td><?php echo ($vi["realname"]); ?></td>
	<td>
		<?php if($vi["state"] == 0): ?>待审批
		<?php else: ?>普通成员<?php endif; ?>
	</td>
	<td>
		<ul>
      <?php if($vi["state"] == 0): ?><li><a href="<?php echo U('Index/setPracticeUser',array('id'=>$vi['sid']));?>"><i class="icon-envelope"></i>审批通过</a></li><?php endif; ?>
       <li><a href="<?php echo U('Index/delPracticeUser',array('id'=>$vi['sid']));?>"><i class="icon-edit"></i>删除</a></li>
	</td>
	</tr><?php endforeach; endif; else: echo "" ;endif; ?>
	</table>
</div>
</div>

			  <!-- regModal -->
<div class="modal fade" id="regModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"></span></button>
        <h4 class="modal-title" id="myModalLabel">用户注册：</h4>
      </div>
      <div class="modal-body">
      <form method="post" enctype="multipart/form-data"  action="<?php echo U('Index/register');?>"  class="form-horizontal">
       <table>
    <div class="form-group">
    <label for="username" class="col-sm-2 control-label">用户名:</label>
    <div class="col-sm-6">
    <input type="text" class="form-control" id="username" name="username" placeholder="username"  >
    </div></div>

    <div class="form-group">
    <label for="pass" class="col-sm-2 control-label">密码:</label>
    <div class="col-sm-6">
    <input type="password" class="form-control" id="pass" name="pass"  placeholder="password" >
    </div></div>

    <div class="form-group">
    <label for="pass2" class="col-sm-2 control-label">确认密码:</label>
    <div class="col-sm-6">
    <input type="password" class="form-control" id="pass2" name="pass2"  placeholder="confirm password" >
    </div></div>

    <div class="form-group">
    <label for="stunum" class="col-sm-2 control-label">学号:</label>
    <div class="col-sm-6">
    <input type="text" class="form-control" id="stunum" name="stunum"  placeholder="stunum" >
    </div></div>
     
    <div class="form-group">
    <label for="email" class="col-sm-2 control-label">Email</label>
    <div class="col-sm-6">
    <input type="email" class="form-control" id="email" name="email" placeholder="Email" >
    </div></div>


    <div class="form-group">
    <label for="tele" class="col-sm-2 control-label">电话</label>
    <div class="col-sm-6">
    <input type="tel" class="form-control" id="tele" name="tele" placeholder="telephone" ></input>
    </div></div>

    <div class="form-group">
    <label for="realname" class="col-sm-2 control-label">姓名:</label>
    <div class="col-sm-6">
    <input type="text" class="form-control" id="realname" name="realneme" placeholder="realname" >
    </div></div>

    <div class="form-group">
    <label for="exampleInputFile" class="col-sm-2 control-label" >头像:</label>
    <div class="col-sm-6">
    <input type="file" id="exampleInputFile" name="photo">
    </div></div>
       
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="submit" class="btn btn-primary">注册</button>
      </div>
      </table></form>
    </div>
  </div>
<!-- loginModal -->

</body>
</html>